<template>
	<div class="control-main">
		<div class="warning-top">
			<div class="warning-item">
				<season :bmsUnitList="bmsUnitList" @updataTactic="updataTactic" />
			</div>
			<div class="warning-item time-manage">
				<tactic :bmsUnitList="bmsUnitList" ref="tactic" />
			</div>
		</div>
	</div>
</template>

<script>
import season from "./components/Season.vue";
import tactic from "./components/Tactic.vue";
import { bmsUnitList } from "@/api/modules/control";
export default {
	components: { season, tactic },
	data() {
		return {
			bmsUnitList: [],
		};
	},
	mounted() {
		bmsUnitList().then((res) => {
			this.bmsUnitList = res.data;
		});
	},
	methods: {
		updataTactic() {
			this.$refs.tactic.onChange();
		},
	},
};
</script>
<style lang="scss">
.control-main {
	height: 100%;
	width: 100%;
	.warning-top {
		height: 50%;
		.warning-item {
			height: 100%;
		}
		.time-manage {
			height: calc(100% - 37px);
		}
	}
}
</style>
